﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace SharpTRI
{
    class PeacefulBot : Bot
    {
        public PeacefulBot(float walkRange)
            : base(walkRange)
        {
            Xors3D.xEntityColor(Mesh, 0, 0, 255);
        }

        public override void Update()
        {
            if (!IsDead())
            {
                if (!Attacked)
                {
                    Walk();
                }
                else
                {
                    Attack(mTarget);
                    if (InPosition(mTarget.Position))
                    {
                        DealDamage(mTarget);
                    }
                }
                Move();
            } 
            else
            {
                Xors3D.xEntityColor(Mesh, 0, 0, 50);
            }
        }
    }
}
